package icu.guodapeng.api.controller

import icu.guodapeng.service.UserService
import org.apache.dubbo.config.annotation.Reference
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RestController

@RestController
class UserController {

    @Reference
    lateinit var userService: UserService

    @GetMapping("/user/{id}")
    fun getUserById(@PathVariable id: Long): String {
        return userService.getUserById(id)
    }
}